home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / GRAPH_FO / (GRAPH / CGRAPHTE / CSELRECT.C < prev    next >
Text File  |  1991-02-09  |  972b  |  37 lines

  1. /******************************************************************************
  2.     CSelRectTask.c
  3.  
  4.         Implements the selection by drawing a rectangle. This is the default
  5.         behaviour of it's superclass. This one only implements the Do()
  6.         method.
  7.  
  8.     SUPERCLASS = CGraphTask.c
  9.  
  10.     Copyright ⌐ 1991 Maarten Meijer. All rights reserved.
  11.         CIS 100016,1764; FidoNet 2:512/114
  12. *******************************************************************************/
  13.  
  14. #include <MacTypes.h>
  15. #include <Global.h>
  16.  
  17. #include "CSelRectTask.h"
  18.  
  19. void
  20. CSelRectTask::EndTracking(Point *currPt, Point *prevPt, Point *startPt) {
  21.  
  22.     inherited::EndTracking(currPt,prevPt,startPt);
  23.     Do();
  24.     }
  25.  
  26. /******************************************************************************
  27.     Do
  28.  
  29.         Select all nodes that are inside the rect.
  30. *******************************************************************************/
  31. void
  32. CSelRectTask::Do() {
  33.     Rect    selRect;
  34.  
  35.     GetRect(&selRect);
  36.     itsGraph->vertexList->Select(&selRect);
  37.     }